package com.beyond.trace.domain.warn;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

/**
 * @ClassName: Device
 * @author: z越
 * @date: 2023/2/28  14:47
 * @description 设备信息表
 */
@Data
public class Device {
    /**主键id*/
    @TableId(type= IdType.AUTO)
    private Long id;
    /**设备编号*/
    private String device_no;
    /**设备名称*/
    private String alias;
    /**设备类型*/
    private String type;
    /**地址*/
    private String address;
    /**状态*/
    private String status;

    public Device(JSONObject object) {
        this.device_no = object.getString("deviceNo");
        this.alias = object.getString("alias");
        this.type = object.getString("type");
        this.address = object.getString("address");
        this.status = object.getString("status");
    }

    public Device(){

    }
}
